package cn.weiyx.feign;

import java.util.Map;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import cn.weiyx.movie.User;

@FeignClient(name = "springcloud-user", configuration = FeignLogConfiguration.class)
public interface UserFeignClient {
	
	@RequestMapping(value = "/{id}", method = RequestMethod.GET)
	public User findById(@PathVariable("id") Long id);
	
	@RequestMapping("/user.id.get")
	public User findById(@RequestParam("id") Long id, @RequestParam("name") String name);
	
	@RequestMapping("/user.id.get")
	public User findById(@RequestParam Map<String, Object> map);
	
}
